<template>
  <div>
    <div>
      <el-form ref="form" :model="form" label-width="86px">
        <el-form-item required label="处理账号:">
          <el-input v-model.trim="form.processingUser" maxlength="11"></el-input>
        </el-form-item>
        <el-form-item label="处理内容:">
          <el-input v-model="form.processingContent" type="textarea"></el-input>
        </el-form-item>
      </el-form>
    </div>

    <div class="bottom-layout">
      <el-button type="primary" size="mini" @click="commit">确定</el-button>
      <el-button size="mini" @click="cancel">取消</el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: "HandleWarnDialog",
  data(){
    return{
      form:{
        processingUser:this.$store.state.user.name,
        processingContent:'',

      }
    }
  },
  methods: {
    cancel() {
      this.$emit("cancel", true);
    },
    commit() {

      if(this.form.processingUser === null || this.form.processingUser === ''){
        this.$message.warning("请输入处理账号")
        return
      }


      this.$emit("success", this.form);
    }
  }
}
</script>

<style scoped>

.bottom-layout {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 40px 0 0;
}
</style>
